package com.thh.es.entity;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

@Document(indexName = "file_search_info", type = "docs")
public class FileSearchInfo{

    @Id
    private String id;   //数据主键


    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String fileName;   //标题

    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String remark;   //备注

    private Date modifyDate; //发布时间

    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String content; //内容

    @Field(type = FieldType.Keyword)
    private String modifyUser;


    private String filePath;//文件路径

    public FileSearchInfo() {
    }

    public FileSearchInfo(String id, String fileName, String remark, Date modifyDate, String content, String modifyUser, String filePath) {
        this.id = id;
        this.fileName = fileName;
        this.remark = remark;
        this.modifyDate = modifyDate;
        this.content = content;
        this.modifyUser = modifyUser;
        this.filePath = filePath;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Date getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(Date modifyDate) {
        this.modifyDate = modifyDate;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getModifyUser() {
        return modifyUser;
    }

    public void setModifyUser(String modifyUser) {
        this.modifyUser = modifyUser;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }
}
